package dbutilsDemo.springDemo;

import net.sf.cglib.proxy.Enhancer;

public class SetterFactory {
	private static final SetterInterceptor setterInterceptor = new SetterInterceptor();

	public static <T extends BaseDO> T getSetterInstance(Class<T> clazz) {
		Enhancer enhancer = new Enhancer();
		enhancer.setSuperclass(clazz);
		enhancer.setCallback(setterInterceptor);
		return (T) enhancer.create();
	}
}
